package com.choosefine.springboot.devops.user.service;

import com.choosefine.springboot.devops.base.service.BaseService;
import com.choosefine.springboot.devops.user.model.User;
import org.beetl.sql.core.SQLManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService extends BaseService{
	@Autowired
	private SQLManager userMapper;

	public User selectById(Integer id){
		User request=new User();
		request.setId(id);
		User result=userMapper.selectSingle("user.selectById",request,User.class);
		return result;
	}

	public User selectByCode(String code){
		User request=new User();
		request.setOpenid(code);
		User result=userMapper.selectSingle("user.selectByCode",request,User.class);
		return result;
	}
}
